Rule Parser

This module is responsible for creating the business rules for the CCHR conversion system.

Exported Classes:

Exported Methods:

parse_rules – This method is called during the stage and process phase to create the business rules for that phase.

Exceptions:

RuleParsingError

ConvertError – This error is raised when a value we are trying to convert can not be handled by a Crosswalk object.

DataError

FatalDataError

class src.parse_rules.VariableConverter(time, segment, var, phase, **kw)[source]
add_region(region, mod, crosswalk)[source]
create_func(mod, crosswalk, add_info)[source]
set_auto_id(start_value=1)[source]

This modules sets the translate function to pass an id value to the conversion function. The first id will start at start_value, which has a default value of 0, and will increment by one for each row.

set_format(format)[source]
translate(state_var, value, row)[source]
src.parse_rules.mod_counter()[source]
src.parse_rules.parse_rules(rule_dir, segment, **opt)[source]
src.parse_rules

alias of src.parse_rules

This Page